package jit.hf.agriculture.Service;

import jit.hf.agriculture.Repository.TestUserRepository;
import jit.hf.agriculture.domain.TestUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Auther: zj
 * @Date: 2018/8/7 13:57
 * @Description:
 */
@Service
public class TestUserServiceImpl implements TestUserService{

    @Autowired
    private TestUserRepository testUserRepository;

    @Override
    public TestUser findById(int id) {
        return testUserRepository.findById( id );
    }

    @Override
    public TestUser save(TestUser testUser) {
        return testUserRepository.save( testUser );
    }

    @Override
    public int delete(int id) {
        return testUserRepository.deleteById( id );
    }
}
